import request from '@/utils/request.js'

/**
 * h5用户登录
 * @param data object 用户账号密码
 */
export function loginH5(data) {
  return request.post('login', data, {
    noAuth: true,
  })
}

/**
 * h5用户手机号登录
 * @param data object 用户手机号 也只能
 */
export function loginMobile(data) {
  return request.post('app-api/app/dybz/login/app-sms-login', data, {
    noAuth: true,
  })
}

export function appPhoneLogin(data) {
  return request.post('app-api/blind/member/login/app-phone-login', data, {
    noAuth: true,
  })
}

/**
 * 验证码key
 */
export function getCodeApi() {
  return request.get(
    'verify_code',
    {},
    {
      noAuth: true,
    }
  )
}

/**
 * h5用户发送验证码
 * @param data object 用户手机号
 */
export function registerVerify(phone) {
  return request.post(
    'sendCode',
    {
      phone: phone,
    },
    {
      noAuth: true,
    },
    1
  )
}

/**
 * h5用户手机号注册
 * @param data object 用户手机号 验证码 密码
 */
export function register(data) {
  return request.post('register', data, {
    noAuth: true,
  })
}

/**
 * 用户手机号修改密码
 * @param data object 用户手机号 验证码 密码
 */
export function registerReset(data) {
  return request.post('register/reset', data, {
    noAuth: true,
  })
}

/**
 * 获取用户中心菜单
 *
 */
export function getMenuList() {
  return request.get('menu/user')
}

// 充值密码
export function astrologer(data) {
  return request.post(`app-api/blind/member/login/astrologer`, data)
}

// 新增文件
export const uploadFile = data => {
  return request.post({
    url: '/infra/file/upload',
    data,
  })
}

// 获得相亲红娘商品信息
export const getMatchmakerProductInfo = async data => {
  return await request.get(`app-api/maker/matchmaker-product-info/getMatchmakerProductInfo`, data)
}

//获得大医本正医生银行卡分页
export function getDoctorBankPage(data) {
  return request.get(`app-api/dybz/doctor-info/getDoctorBankPage`, data)
}

//创建大医本正医生银行卡
export function createDoctorBank(data) {
  return request.post(`app-api/dybz/doctor-info/createDoctorBank`, data)
}

// 删除大医本正医生银行卡
export function deleteDoctorBank(data) {
  return request.delete(`app-api/dybz/doctor-info/deleteDoctorBank?id=${data}`)
}

//获得大医本正医生列表
export function getDoctorInfoPage(data) {
  return request.get(`app-api/dybz/doctor-info/getDoctorInfoPage`, data)
}

//创建大医本正团队管理
export function createTeamManage(data) {
  return request.post(`app-api/dybz/doctor-info/createTeamManage`, data)
}

//获得大医本正医生列表
export function getTeamManagePage(data) {
  return request.get(`app-api/dybz/doctor-info/getTeamManagePage`, data)
}

//获得大医本正医生列表
export function consultationGetTeamManagePage(data) {
  return request.get(`app-api/dybz/consultation-info/getTeamManagePage`, data)
}

//获得大医本正团队管理分页
export function getMyTeamManageList(data) {
  return request.get(`app-api/dybz/doctor-info/getMyTeamManageList`, data)
}

// 删除大医本正团队管理
export function deleteTeamManage(data) {
  return request.delete(`app-api/dybz/doctor-info/deleteTeamManage?id=${data}`)
}

//创建投诉建议
export function createComplainProposal(data) {
  return request.post(`app-api/dybz/doctor-info/createComplainProposal`, data)
}

//获取医生个人信息
export function getDoctorInfo(data) {
  return request.get(`app-api/dybz/doctor-info/getDoctorInfo`, data)
}

//更新大医本正医生信息
export function updateDoctorInfo(data) {
  return request.put(`app-api/dybz/doctor-info/updateDoctorInfo`, data)
}

//获取医生个人信息
export function getDoctorStatic(data) {
  return request.get(`app-api/dybz/doctor-home/getDoctorStatic`, data)
}

//获取医生个人信息
export function getCommentManagementPage(data) {
  return request.get(`app-api/dybz/doctor-info/getCommentManagementPage`, data)
}

//查询医生信息评价统计
export function queryDoctorCommentStatic(data) {
  return request.get(`app-api/dybz/doctor-info/queryDoctorCommentStatic`, data)
}

//获得大医本正医院列表
export function getHospitalList(data) {
  return request.get(`app-api/dybz/common-tools/getHospitalList`, data)
}

//获得大医本正医院列表
export function getHospitalNameList(data) {
  return request.get(`app-api/dybz/common-tools/getHospitalNameList`, data)
}

//获得大医本正科室管理分页
export function getDepartManagementTree(data) {
  return request.get(`app-api/dybz/common-tools/getDepartManagementTree`, data)
}

//获得大医本正科室管理分页
export function getDiseaseTree(data) {
  return request.get(`app-api/dybz/outpatient-info/getDiseaseTree`, data)
}

//获得大医本正科室管理分页
export function identityAuthentication(data) {
  return request.post(`app-api/dybz/doctor-info/identityAuthentication`, data)
}

//获得大医本正职级信息
export function getTitleInfo(data) {
  return request.get(`app-api/dybz/outpatient-info/getTitleInfo`, data)
}

//获得医生端患者管理分页
export function getPatientInfoPage(data) {
  return request.get(`app-api/dybz/patient-info/getPatientInfoPage`, data)
}

//获得医生端患者
export function getPatientInfo(data) {
  return request.get(`app-api/dybz/patient-info/getPatientInfo`, data)
}

//获得大医本正职级信息
export function notifyMessagePage(data) {
  return request.get(`app-api/dybz/notify-message/page`, data)
}

//获得大医本正职级信息
export function notifyMessageGet(data) {
  return request.get(`app-api/dybz/notify-message/get`, data)
}

//获取药师个人信息
export function getPharmacistInfo(data) {
  return request.get(`app-api/dybz/pharmacist-info/getPharmacistInfo`, data)
}

//获得大医本正处方信息分页
export function getPrescriptionInfoPage(data) {
  return request.get(`app-api/dybz/pharmacist-info/getPrescriptionInfoPage`, data)
}

//审核大医本正处方信息
export function auditPharmacistInfo(data) {
  return request.put(`app-api/dybz/pharmacist-info/auditPharmacistInfo`, data)
}

//获得我的大医本正团队管理分页
export function getMyTeamManage(data) {
  return request.get(`app-api/dybz/doctor-info/getMyTeamManage`, data)
}

//获得我的大医本正团队管理分页
export function getConsultationTeamInfo(data) {
  return request.get(`app-api/dybz/consultation-info/getConsultationTeamInfo`, data)
}

//解散团队
export function dissolveTeam(data) {
  return request.delete(`app-api/dybz/doctor-info/dissolveTeam?id=${data}`, data)
}

//创建投诉建议
export function pharmacistCreateComplainProposal(data) {
  return request.post(`app-api/dybz/pharmacist-info/createComplainProposal`, data)
}

//获得我的大医本正团队管理分页
export function getDiagnosisSubject(data) {
  return request.get(`app-api/dybz/doctor-info/getDiagnosisSubject`, data)
}

//获得大医本正-疾病监控分页
export function getDiseaseControl(data) {
  return request.get(`app-api/dybz/doctor-info/getDiseaseControl`, data)
}

//获得大医本正-疾病监控分页
export function getDiseaseControlPage(data) {
  return request.get(`app-api/dybz/doctor-info/getDiseaseControlPage`, data)
}

//获得大医本正-疾病监控查询
export function getDiseaseControlList(data) {
  return request.get(`app-api/dybz/doctor-info/getDiseaseControlList`, data)
}

// 获取人脸识别的认证信息
export function getSing(data) {
  return request.post(`app-api/tencent/getSing`, data)
}
